#include<cmath>
#include<iostream> 
using namespace std;
const int N = 10005;
int arr[N][N];
int main(){
    int n,m,q;
    cout<<N;
    cin>>n>>m>>q;
 
    for(int i = 1; i<= m; i++){
    	int u,v,w;
    	cin>>u>>v>>w;
    	arr[u][v] = w;
	}
	for(int i = 1; i<= q; i++){
    	int x,y;
    	cin>>x>>y;
    	
	}
	return 0;
} 
